Python学习笔记(1)

1 def sum_args(*args):
2     return sum(args))
3     
4 def run_with_positional_args(func, *args):
5     return func(*args)
6 
7 run_with_positional_args(sum_args, 1, 2, 3, 4)

 

posted @ 2019-04-29 16:41  萤火虫小巷  阅读(154)  评论(0编辑  收藏  举报